home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44d.zip / SRCH32.QM < prev    next >
Text File  |  1992-06-22  |  26KB  |  576 lines

  1. *                                SRCH32.QM
  2. *             Macros To Search/Replace In Text And ZIP Files
  3. *                        Written by Tom Hogshead
  4. *                                 6/1/92
  5. * Key       Subfile                       Description
  6. * ====  ===============  ================================================
  7. *                   FROM COMMAND LINE ONLY...
  8. *  @0    {e:\up\SR}      Search/Replace with SR.BAT and SZR.BAT (zip's)   |chg
  9. *  @5    {e:\up\SRQ}     Search/Replace with SRQ.BAT, Quit After Rplcmnt. |chg
  10. *  @7    {e:\up\SRL}     Search Only    with SRL.BAT and SZ.ZIP (zip's)   |chg
  11. *  @6    {e:\up\SM}      Search Only    with SM.BAT (Maxfind)
  12. *
  13. *                   WHILE EDITING...
  14. *  @1                    Make Filelist Containing Search Text
  15. *  @2                    Load Filelist Containing Search Text
  16. *  @3                    Search/Replace Across All Files in Ring
  17. *  @f1                   Find All Search Text In Current File, Use FGREP
  18. *  @f2                   Find All Search Text In Current File, Use Dos FIND
  19. *  @f3                   View Another Occurrence of Srch Text Aftr @f1/f2 |chg
  20. *   f4                   RepeatFind
  21. *   f5                   PrevFile
  22. *   f6                   NextFile
  23. *  @h                    Locate Index Item In Current File Below
  24. *
  25. *  Index Use,  How to locate macro or item below from Index using @h
  26. *  Description,  Search/Replace Macros
  27. *  Startup,  What's Required
  28. *  Environment Variables
  29. *  Required Program Files
  30. *  Macros
  31. *  Other Macros
  32. *  CAUTION <<<<<<<<<<<<<<<<<<< IMPORTANT
  33. *  Version History
  34. *
  35. *-- eoi
  36.  
  37.  
  38. *                Confirms  Saves    Must Be
  39. *                Replace-  Loaded   First
  40. * Key Run While  ment?     Files?   Macro? [1]        Comments
  41. * ──  ─────────  ────────  ──────   ────── ───  ───────────────────
  42. * @0  cmnd line  no        yes      yes     f   s/r w/SR.bat/SZR.BAT
  43. * @5  cmnd line  no        yes/quit yes     f   s/r w/SRQ.bat
  44. * @6  cmnd line  srch only n/a      yes     m   s/o w/SM.BAT
  45. * @7  cmnd line  srch only n/a      yes     f   s/o w/SRL.BAT/SZ.BAT
  46. * @1┐ editing    n/a       n/a      no      f   makes FileList only
  47. * @2┤ editing    n/a       n/a      no      f   loads files only
  48. * @3┘ editing    no        rpl only no      f   s/r loaded files
  49. * @f1 editing    srch only no       no      f   s/o current file
  50. * @f2 editing    srch only no       no      f   s/o current file
  51. * @f3 editing    n/a       no       no          View another occurrence
  52. * ----------------------------
  53. *                [1] Uses:   m- MAXFIND     f - FGREP.COM
  54.  
  55.  
  56. * (INDEX) USE; To locate a macro or item in this file, press @h, place
  57. * the cursor line on the desired item in the Index above, and press
  58. * <enter>.  See BOOKxx.QM for more details.
  59.  
  60. * (DESCRIPTION): (SRCH32) are QEdit macros to search/replace and search
  61. * only files containing search text from a file pattern or a FileList
  62. * of file patterns to search using FGREP.COM and MAXFIND.  Only files
  63. * containing the search text are loaded automatically, and then the
  64. * desired search/replace is performed.  Search/replace may be done from
  65. * the command line and while editing files.  Search or search/replace
  66. * may be also performed on ZIP files without manually unzipping and
  67. * rezipping.
  68.  
  69. * In addition to SR, SRL, and SRQ batch files, two additional batch
  70. * files are provided to search and replace files within ZIP's.  SZ.BAT
  71. * and SZR.BAT are batch files using FGREP.COM to search and
  72. * search/replace text within ZIP's without having to manually unzip,
  73. * search, replace, and then rezip.  For example, at the command line:
  74.  
  75. *                     SZR fff FFF TEST <enter>
  76.  
  77. * finds all occurrences of "fff" in files within TEST.ZIP and replaces
  78. * it with "FFF".  Files containing the search text are loaded after
  79. * replacement so each replacement can be viewed before re-zip.  The
  80. * user is given the option of updating each ZIP on a file by file basis
  81. * before re-zipping.
  82.  
  83. * Batch file SM.BAT is also provided to search text files with MAXFIND.
  84. * SM.QM are QEdit macros to use with SM.BAT for searching files
  85. * containing a search string using MaxFind.  Files are searched, found,
  86. * and loaded for editing or viewing.  The search string, file names, and
  87. * other input or search options may be specified at the command line or
  88. * entered at the option query prompt.  "Fuzzy", "and/or", and "sliding
  89. * window" text searches can be done.
  90.  
  91. * If you wish to do 'case sensitive' search/replace, modify SR.BAT as
  92. * follows:
  93. *         FGREP.COM -flc /%S~~%/  %file% >c:\$.ql
  94. *                      ^
  95.  
  96. * (STARTUP): To BEGIN, just type "START SRCH" <Enter>.  All pertinent
  97. * files will be loaded in the "Ring" for viewing, and SRCH32.MAC is
  98. * read.
  99.  
  100. * To perform a search/replace from the command line, type SR, and
  101. * answer the prompts for search and replace text.  To perform a SEARCH
  102. * ONLY from the command line, type SRL, and answer the prompts for
  103. * search text.  All searches with these macros and batch files are
  104. * Case insensitive.  To perform a case sensitive search, change "GIN"
  105. * to "GN"in the macros and "-f" to "-fc" in the batch files.
  106.  
  107. * Search and replacement text must be single words when entered at teh
  108. * command line.  Multiple word search/replacement text can only be
  109. * entered when answering search and replacement query prompts, not from
  110. * the command line.
  111.  
  112. * Replacing c:\ with your ram disk will spped things up.
  113.  
  114. * (ENVIRONMENT) VARIABLES
  115. * -------------------------
  116. * All search and search/replace batch files use environment variables.
  117. * Some environment variables can be set to facilitate use of these
  118. * batch files, however setting any environment variable is optional.  If
  119. * any or all of the following environment variable are *not* set (ie
  120. * "SET [name]= " the user will be prompted for the required inputs, or
  121. * values can be specified at the command line as described in each
  122. * batch file.
  123.  
  124. * a) "SET OPT=off" will bypass the option query prompt in SRL.BAT and
  125. *     SM.BAT, and bypass the File Name query prompt in SR.BAT and
  126. *     SRQ.BAT.
  127.  
  128. * b) "SET OPT= " will *not* bypass the option query prompt in SRL.BAT
  129. *     and SM.BAT, and will *not* bypass the File Name query prompt in
  130. *     SR.BAT and SRQ.BAT.
  131.  
  132. * c) "SET FILELIST=srch-fg.lst" searches with standard file list
  133. *     srch-fg.lst in SR.BAT, SRL.BAT and SRQ.BAT.  SM.BAT uses the
  134. *     program MAXFIND which cannot search from filelists.
  135.  
  136. * d) "SET FILELIST=c:\srch-fg.lst" searches with standard file list
  137. *     c:\srch-fg.lst in SR.BAT, SRL.BAT and SRQ.BAT.
  138.  
  139. * e) "SET FILELIST=sm.lst" searches with standard file list sm.lst for
  140. *     testing SR.BAT, SRL.BAT and SRQ.BAT.  SM.LST is provided in
  141. *     AMACxx.ZIP.  SM.LST is just one line "*.tst" to search SM.TST,
  142. *     and any other files with extension .tst.
  143.  
  144. * f) "SET FILELIST= " will prompt for file name(s) or an @filelist at
  145. *     the File Name query prompt.  The batch files are written to use
  146. *     file list SM.LST if nothing is entered at the File Name query
  147. *     prompt.
  148.  
  149. * The macros used with these batch files must either be located in the
  150. * current directory from which we are searching, or the location of
  151. * these macros must be specified with the environment variable SRMAC as
  152. * follows:
  153.  
  154. * g) "SET SRMAC= " means macro files are located in current directory
  155. *     from which we are searching.
  156.  
  157. * h) "SET SRMAC=c:\" means macro files are located in c:\ directory.
  158. *     c:\ may be any drive:\path\ terminating with a \.
  159.  
  160. * By default, SZ.BAT and SZR.BAT create, and delete afterwards, a
  161. * temporary directory c:\$zip$ into which the ZIP file is un-zipped.  It
  162. * is preferable to use a ram drive for speed.  An alternative temporary
  163. * directory can be used by setting the environment variable SZTEMP as
  164. * follows:
  165.  
  166. * i) "SET SZTEMP= " uses default directory c:\$zip$ for the temporary
  167. *     directory.
  168.  
  169. * j) "SET SZTEMP=e:\name" uses directory e:\name (no trailing \) for
  170. *     the temporary directory.
  171.  
  172. * Here's contenets of file SRCH-FG.LST included:
  173.  
  174. *             *.qm
  175. *             *.ql
  176. *             *.inf
  177. *             *.bat
  178. *             *.lst
  179. *             *.me
  180. *             *.doc
  181. *             *.syn
  182. *             *.tst
  183. *             *.new
  184. *             *.lgo
  185. *     e:\syn\sa.syn
  186. *     e:\nk\nk1.key
  187.  
  188. * The SA.SYN entry is my PCED synonym file.  NK1.KEY is my NewKey macro
  189. * file.  Batch files have more information and instructions.
  190.  
  191. * The following temporary environment variables are set during batch
  192. * file operation and need not be set by the user:
  193.  
  194. *         S~~     search text
  195. *         R~~     replacement text
  196. *         file    File Name or file list specified at query prompt or
  197. *                 at the command line.
  198.  
  199. * All environment variables remain as set during operation so they may
  200. * be viewed with SET afterwards.
  201.  
  202.  
  203. *                   ********* (CAUTION) ***********
  204.  
  205. * *************************************************************************
  206. * * Alt_0/5/6/7 set and use the Dos environment variables S~~ and R~~.    *
  207. * * The letters "S~~" and "R~~" must NOT occur in any other Dos           *
  208. * * environment variable name or value. If any files being searched have  *
  209. * * attribute set Read Only, macros will stop when they try to save a     *
  210. * * Read Only file after replacements have been made.                     *
  211. * *************************************************************************
  212.  
  213. * You must have enough environment space to store both the search and
  214. * replacement text.  I suggest at least 100 bytes.
  215.  
  216. * QEdit must be named Q.EXE.  Insert should be ON.
  217.  
  218. * For (other) macros, see ALLMACRO.INF.
  219.  
  220. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  221. * Some macros require QEdit v2.15.
  222.  
  223. * (REQUIRED) PROGRAM FILES
  224. * -------------------------
  225. * You──MUST──have the executable program files in AMAC-PRG.ZIP to run
  226. * some of these macros. AMAC-PRG.ZIP can be found on the following BBS's:
  227. *
  228. *                                 SemWare
  229. *                                 Exec-PC
  230.  
  231. * It can NOT be found on CompuServe since many of the programs are
  232. * Copyrighted.  All program files are ShareWare, and inclusion in
  233. * AMAC-PRG.ZIP is not prohibited in their documentation.
  234.  
  235. * FGREP.COM.ZIP and INPUT.ZIP are the only files necessary to run
  236. * SR.BAT, SRL.BAT and SRQ.BAT.  MAXFND23.COM and INPUT.COM are the only
  237. * files necessary to run SM.BAT.  FGREP.COM, DX.EXE, PKZIP.EXE and
  238. * PKUNZIP.EXE are required to run SZ.BAT and SZR.BAT.
  239.  
  240. * FGREP.COM can be found on Exec-PC as FGREP172.ZIP.  INPUT can be
  241. * found on Exec-PC as INPUT.ZIP.  MAXFIND v2.3 can be found on
  242. * CompuServe IBMSYS Lib 3 as MAXFND.ZIP and on EXec-PC as MAXFND23.ZIP
  243.  
  244. * See SR.BAT and SZR.BAT for files required to search/replace within
  245. * Zip's.
  246.  
  247. * AMAC-PRG.ZIP contains:
  248. * ----------------------
  249. * Name          Length    Method     SF   Size now  Mod Date
  250. * ============  ========  ========  ====  ========  =========
  251. * INPUT.ZIP         3097   Stored     0       3097  07 May 86
  252. * MAXFND23.ZIP     24247   Stored     0      24247  26 Apr 90
  253. * RJ.ZIP            9965   Stored     0       9965  01 Dec 90
  254. * FGREP172.ZIP     12513   Stored     0      12513  19 May 90
  255. * DX211.ZIP       100895   Stored     0     100895  17 Mar 89
  256. * AMAC-PRG.INF      3138  Imploded   67       1014  23 Apr 91
  257. * ============  ========  ========  ====  ========  =========
  258. * *total     6    153855  ZIP 1.10    0%    152329  23 Apr 91
  259.  
  260. * These files are probably on many other BBS's also.  I thank the
  261. * authors for these excellent programs.
  262.  
  263.  
  264. * (Macros)
  265. *                            M A C R O S
  266. * ----------------------------------------------------------------------
  267. * @(1)   Makes Filelist Of Files Containing Search Text
  268. * ----------------------------------------------------------------------
  269. @1      macrobegin
  270.         onewindow               * For sort                         *|
  271.         dos 'fgrep -f0 /'       * Make FileList
  272.             pause               * Pause for search text
  273.             '/>c:! @srch-fg.lst'* Fgrep input
  274.             pause               * Pause to change filelist/files   *|
  275.             return return
  276.         editfile
  277.             "c:!" return quit
  278.         editfile return         * Edit FileList
  279.         begfile markcolumn      * Mark begfile c:!
  280.         endfile begline         * Mark endfile col 1
  281.         wordright wordright     * Get to file name
  282.         cursorleft              * Move off file name
  283.         deleteblock             * Delete file name
  284.         savefile                * Save FileList
  285.         begfile markcolumn      * Mark begfile c:!
  286.         endfile                 * Get to end
  287.         gotocolumn "12" return  * Get all file names in block
  288.         sort                    * Sort FileList
  289.         killfile                * Kill c:!
  290.         begfile unmarkblock
  291. *
  292. * 99 bytes Tue  07-02-1991  17:56:32 (TH @1)
  293. * 101 bytes Thu  04-16-1992  09:58:07 (TH @1, pause to change input)
  294.  
  295. * 
  296. * ----------------------------------------------------------------------
  297. * @(2)   Loads Filelist Of Files Containing Search Text
  298. * ----------------------------------------------------------------------
  299. * Written by Kyle Watkins, SemWare.
  300.  
  301. @2      MacroBegin
  302.         EndFile BegLine     * Start at last line
  303.  REPEAT:
  304.         UnmarkBlock
  305.         MarkLine Copy       * Grab this name
  306.         EditFile            * Get ready to load
  307.         CurrentFilename " " * To force return *here*
  308.         Paste Return        * Paste file name & do it!
  309.         CursorUp            * More lines above?
  310.         JTrue REPEAT        * If yes, repeat.
  311. *
  312. * 19 bytes Mon  09-03-1990  00:56:04
  313.  
  314. * 
  315. * ------------------------------------------------------------------------
  316. * @(3)  Search and Replace Across All Files In Ring
  317. * ------------------------------------------------------------------------
  318. * This macro will do a search and replace of all files in the ring.  If
  319. * no replacement is made, that file is 'quit'.  If any replacement is
  320. * are made, that file is saved and remains loaded.  Replacement is case
  321. * insensitive.  This macro requires QEdit v2.15.
  322.  
  323. * User is prompted for search and replace text.  The replacements are
  324. * then made, and the macro ends when all replacements have been made
  325. * with the cursor in the starting file.  If the macro does not end with
  326. * the cursor in the starting file, this means the file the macro ends
  327. * in had the cursor in column 2 when the macro was invoked, which is
  328. * the 'position marker' used to end the macro after cycling through all
  329. * files in the ring, and you should continue invoking the macro until
  330. * the you end in the starting file.  The starting file will not be
  331. * quit from the ring if no replacements are made.
  332.  
  333. * This macro is based on a macro written by Kyle Watkins on SemWare BBS
  334. * Conference 0, Message #9940, "Once Around the File-Ring", 9/14/90.  A
  335. * copy of that message is in Amac42e.zip and prior versions of Amac.
  336. * Prior versions of @3 used the Nul file as a position marker.  This
  337. * version uses the starting file as 'position marker' putting the
  338. * cursor in column 2 to trigger the macro to end after cycling through
  339. * all files in the ring.
  340.  
  341. @3      macrobegin
  342.         begline cursorright         * Put cursor in col 2                  *|
  343.         findreplace
  344.             pause return            * User input of Find Item
  345.             pause return            * User input of Replace Item
  346.             "GIN" return            * Do all loaded files no prompt
  347. *           pause return            * Use to select options
  348.         jtrue SAVE                  * If changes, save file we started in  *|
  349.     LOOP:
  350.         setscreenon setscreenoff    * Remove if not using QEdit v2.15
  351.         nextfile                    * Move to next files in ring
  352.         cursorleft jfalse REPLACE   * If we can't move left, begin replacement
  353.         cursorleft jfalse END       * If we still can't move left, we're in
  354.                                     *   file we started in, end macro
  355.     REPLACE:
  356.         pageup jtrue REPLACE        * Must be at tof for repeatfind w/GIN  *|
  357.         repeatfind                  * Do the FindReplace
  358.         jtrue SAVE                  * If changes are made save file
  359.         quit                        * Quit file w/no replacements
  360.         jump LOOP
  361.     SAVE:
  362.         savefile                    * Save file with changes
  363.         jump LOOP
  364.     END:
  365. *
  366. * 62 bytes Sat  09-15-1990  11:17:57 (K. Watkins version)
  367. * 41 bytes Sun  09-30-1990  20:32:55 (this version)
  368. * 45 bytes Tue  08-06-1991  22:30:19 (TH @8, replaced '!' with 'NUL')
  369. * 50 bytes Tue  08-06-1991  22:37:23 (TH @8, set FindReplace option 'GIN')
  370. * 50 bytes Wed  04-22-1992  00:10:05 (TH @3, changed key)
  371. * 48 bytes Fri  05-22-1992  12:17:29 (TH @3, added setscreenoff|on,
  372. *                                                  removed Nul file)
  373.  
  374. * 
  375. * ----------------------------------------------------------------------
  376. * @(5) Search/Replace From Command Line, Quit Each File After Rplcmnt.
  377. * ----------------------------------------------------------------------
  378. * See SRQ.QM for this macro.
  379.  
  380. * 
  381. * ----------------------------------------------------------------------
  382. * @(6) - Srch Only From Command Line, Loads Files w/SM.BAT, No Replace
  383. * -------------------- uses MaxFind mf.exe -----------------------------
  384. * See SM.QM for @6.
  385.  
  386. * 
  387. * ----------------------------------------------------------------------
  388. * @(7) -Start Up Macro, Loads Only Found Files, No Replacement
  389. * ----------------------------------------------------------------------
  390. * See SRL.QM for @7.
  391.  
  392. * 
  393. * ----------------------------------------------------------------------
  394. * @(0) Macro For Search/Replace From Command Line With SR.BAT
  395. * ----------------------------------------------------------------------
  396. * See SR.QM for @0.
  397.  
  398. * @f1 and @f2 macros are modifications to macros written by Tim Farley
  399. * in BIGFIND.QM dated 8/21/89 and revised 9/6/89.
  400.  
  401. * 
  402. * ----------------------------------------------------------------------
  403. * @(f1)  Find Multiple Search Text In Current File, Uses FGREP.COM
  404. * ----------------------------------------------------------------------
  405. * Find all instances of a given string in current file, let the user
  406. * select one, hit return, and view line containing search string.
  407. * Change "c:" to ramdrive for faster operation.
  408. *
  409. * Uses Chris Dunford's excellent FGREP.COM.  Remember search string is
  410. * case insensitive.
  411.  
  412. @f1     MacroBegin
  413.         UnmarkBlock DropAnchor      * Mark current file to return to
  414.                                     * later
  415.         EditFile
  416.             "c:!" Return Quit       * Quit temp file if loaded
  417.                                     * Sets EditFile prompt for later
  418.         GotoBlockBeg                * Return to where we were
  419.         UnmarkBlock
  420.         DOS 'FGREP -L /'            * Prompt for search text
  421.             Pause
  422.             '/>c:! '                * Echo output to temp file
  423.             CurrentFilename Return
  424.             Return                  * Search current file
  425.         EditFile Return             * Load temp file with found text
  426.         Pause                       * Pause to select line to view
  427.         BegLine WordRight MarkWord  * Mark found text line number
  428.         Copy                        * Copy line number to scrap
  429.         KillFile                    * Delete temp file from disk
  430.         PrevFile                    * Return to searched file
  431.         GotoLine Paste Return       * View found text line
  432.         MakeCtrOfScreen             * Put on screen center
  433. *
  434. * 67 bytes Tue  07-02-1991  17:57:22 (TH ^f1)
  435. * 67 bytes Tue  05-26-1992  10:08:25 (TH @f1, changed key from ^f1)
  436.  
  437. * 
  438. * ----------------------------------------------------------------------
  439. * @(f2)  Find Multiple Search Text In Current File, Uses Dos FIND
  440. * ----------------------------------------------------------------------
  441. * Find all instances of a given string in current file, let the user
  442. * select one, hit return, and view line containing search string.
  443. * Change "c:" to ramdrive for faster operation.
  444. *
  445. * Uses Dos FIND. Remember search string is case sensitive.
  446.  
  447. @f2     MacroBegin
  448.         UnmarkBlock DropAnchor  * Mark current file to return to
  449.                                 * later
  450.         EditFile
  451.             "c:!" Return Quit   * Quit temp file if loaded
  452.                                 * Sets EditFile prompt for later
  453.         GotoBlockBeg            * Return to where we were
  454.         UnmarkBlock             * Unmark
  455.         Dos 'FIND /N "'         * Prompt for search text
  456.             Pause '" '
  457.             CurrentFilename     * Search current file
  458.             '>c:!' Return
  459.             Return              * Echo output to temp file
  460.         EditFile Return         * Load temp file with found text
  461.         Pause                   * Pause to select line to view
  462.         BegLine
  463.         WordRight MarkWord      * Mark found text line number
  464.         Copy                    * Copy line number to scrap
  465.         KillFile                * Delete temp file from disk
  466.         PrevFile                * Return to searched file
  467.         GotoLine Paste Return   * View found text line
  468.         MakeCtrOfScreen         * Put on screen center
  469. *
  470. * 65 bytes Sat  02-16-1991  02:55:59
  471. * 65 bytes Tue  05-26-1992  10:08:57 (TH @f2, changed key from ^f2)
  472.  
  473. * 
  474. * ----------------------------------------------------------------------
  475. * @(f3)  View Another Occurrence Of Search Text In Current File
  476. * ----------------------------------------------------------------------
  477. * Position cursor on line to view another occurrence of search text in
  478. * current file, and hit <enter>. Works only after running either
  479. * @f1 or @f2.
  480.  
  481. @f3 MacroBegin
  482.     onewindow                  * Close all windows
  483.     horizontalwindow
  484.     editfile escape            * For all Qconfig's                *|
  485.     zoomwindow                 * Open window full, current file
  486.     editfile "c:!" return      * Load temp file with found text
  487.     begline                    * Re-position cursor
  488.     pause                      * Pause to select line to view
  489.     wordright markword copy    * Mark line #, copy to scrap
  490.     zoomwindow                 * Zoom temp file window small
  491.     prevwindow                 * Back to orig file window
  492.     begline                    * Re-position cursor
  493.     gotoline paste return      * Goto found text line
  494. *   pause                      * Pause to see temp file
  495.     zoomwindow                 * Zoom orig window full
  496. *
  497. * 27 bytes Mon  02-18-1991  00:31:32
  498. * 29 bytes Wed  05-13-1992  12:45:20 (TH ^f3, for all Qconfig's)
  499. * 29 bytes Tue  05-26-1992  10:09:26 (TH @f3, changed key from ^f3)
  500.  
  501.  
  502. * 
  503. * ----------------------------------------------------------------------
  504. * @(h)  Jump From Index Line To (Locate) Macro or Item In Document Below
  505. * ----------------------------------------------------------------------
  506. *        Alt_h can be used to quickly jump from Index Line to the desired
  507. *        item or macro in the document below:
  508. *        1. Press Alt and h at the same time. Line 1 is marked to
  509. *           highlight. Cursor down to desired line in Index.
  510. *        2. Press Enter. The macro then locates and jumps to the item
  511. *           selected on the cursor line in the document below.
  512.  
  513. *   See BOOKxx.Qm and JMPPOSxx.QM in AMACxx.ZIP for more discussion about
  514. *   using bookmarks and positions markers ( ) to jump to positions in
  515. *   files.
  516.  
  517. @h      macrobegin
  518.         unmarkblock defaultwordset begfile endpara markline begfile
  519.         find "(" return "L" return
  520.     jfalse NOMARK
  521.         makectrofscreen begfile
  522.         unmarkblock markline markline prevposition begline
  523.         pause
  524.         wordright markword copy endpara
  525.         find "(" paste ")" return "I" return
  526.     jfalse NOMARK
  527.         begline maketopofscreen scrollup
  528.     jump END
  529.     NOMARK:
  530.         begfile
  531.     END:
  532. *
  533. * 52 bytes Wed  07-31-1991  14:43:31 (TH @h, @4 in BOOKxx.QM)
  534.  
  535.  
  536. * (f4)
  537. f4      RepeatFind
  538.  
  539.  
  540. * (f5)
  541. f5      PrevFile
  542.  
  543.  
  544. * (f6)
  545. f6      NextFile
  546.  
  547.  
  548. * (VERSION) HISTORY
  549. * -------------------
  550. *    3.0b - In AMAC42.ZIP.                                             3/28/92
  551. *    3.1  - Modified @0/4/7 for QEdit v2.15.                           4/15/92
  552. *         - Modified @1 to be able to change fgrep inputs.             4/16/92
  553. *         - Added onewindow to @1 and @5.                              4/21/92
  554. *         - Changed some keys.                                         4/22/92
  555. *         - In Amac42e.zip.                                            4/26/92
  556. *    3.1a - Changed find initialization in sr.qm.                      5/12/92
  557. *         - Modified ^f3 for all Qconfig's.                            5/13/92
  558. *         - Moved @a/f and ^a/f to mis001.qm.                          5/18/92
  559. *         - Removed @4, @8, cursorleft and cursorright.                5/18/92
  560. *         - Shortened @3.                                              5/22/92
  561. *         - Modified documentation in SM.QM.                           5/22/92
  562. *         - Removed f4/f5/f6 from srq.qm.                              5/26/92
  563. *                   (In Amac43.zip)
  564. *     3.2 - Modified SR.QM, SRQ.QM, SR.BAT, SZ.BAT, SRQ.BAT & SZR.BAT   6/1/92
  565. *           to enable text to be removed (Replaced with nothing).
  566. *         - Shortened SRL.QM.                                           6/1/92
  567. *
  568. *
  569. *
  570. *
  571. *
  572. *
  573. *
  574. *
  575. *-- eof
  576.